package com.kgc.sbt.service;


import com.kgc.sbt.beans.Sign;
import com.kgc.sbt.utils.RequestResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.PasswordAuthentication;
import java.util.List;

import com.kgc.sbt.beans.UserLogin;
import javafx.scene.shape.Polygon;

import java.util.Map;

/**
 * Created on 2021/7/5.
 * <p>
 * Author: wanglinjun
 * <p>
 * Description:用户登录查看数据库中是否是否有该用户存在若存在检查账号密码是否正确
 */
public interface UserService {

    //发送验证码
    RequestResult<Map<String, Object>> sendCode(String phone);

    //注册手机号查询
    UserLogin queryByPhone(String phone);
    //验证码注册
    void insertUser(String phone, String password, String userName);

    UserLogin queryUserEntryById(Integer userId);

    boolean modPasswordById(Integer userId, String password);

    boolean modPhoneById(Integer userId, String newPhone);

    boolean modUserNameById(Integer userId, String newName);

    Integer userSigned(Integer userId);

    Sign querySignByUserId(Integer userId);

    Boolean addPoints(Integer userId, Integer points);

    UserLogin queryUserByUserId(Integer userId);

    UserLogin queryByOpenId(String openId);

    boolean updateUserByPhone(String phoneNo, String openId);

    void saveToken(String token,Integer userId);

    void delToken(String token);

    Boolean queryVipByUserId(Integer userId);

    void insertVipByUserId(Integer userId);
}


